<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <button class="create-sse">建立SSE</button>
      <button class="close-sse">关闭SSE</button>
      <button class="start">开始报时</button>
      <button class="stop">停止报时</button>
      <button class="clear">清空日志</button>
      <div>
        <label for="type">事件类型：</label>
        <select id="type" name="event-type" class="event-type">
          <option value="message">message</option>
          <option value="custom">custom</option>
          <option value="server-time">server-time</option>
          <option value="error">error</option>
          <option value="open">open</option>
        </select>
        <label for="data">事件数据：</label>
        <textarea id="data" name="event-data" class="event-data" rows="6"></textarea>
        <div>
          <button class="send-event">前端手动触发事件</button>
          <button class="send-sse">后端发送SSE</button>
          <button class="send-sse-all">给所有客户端推送</button>
        </div>
      </div>
      <output>
        <div>这里是服务端发送的数据：</div>
        <ul class="ul-container"></ul>
      </output>
    </div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>
